<?php

    class SiteController extends Controller {
        public $metaDescription = null;
        public $metaKeywords = null;
        public $linkCanoncical = null;
        public $title = null;
        //public $layout = 'column_main';
        public $layout;

        public function actionError(){                
            if($error=Yii::app()->errorHandler->error)
            {
                //echo $error['message'];die;
                if(Yii::app()->request->isAjaxRequest)
                    echo $error['message'];
                else
                    $this->renderPartial('error', $error);
            }
        }
        
        public function actionIndex(){
            $this->layout = "column_main";
            $url = new Url();        
            
            if(!isset($_SESSION["user_edu_net"])){
                $this->redirect($url->createUrl("user/register"));                
            }else{
                $this->render("index",array());        
            }
                            
        }
        
        public function actionGroup(){
            $this->layout = "column_main";
            $url = new Url();            
            $this->render("group",array());        
        }
        
        /*public function actionLogin(){
            $this->layout = "column_login";
            $url = new Url();                    
            $this->render("login",array());        
        }*/
        
        public function actionAccount(){
            $this->layout = "column_main";
            $url = new Url();            
            $this->render("account",array());        
        }
        
        public function actionRegister(){
            $this->layout = "column_register";
            $url = new Url();            
            $this->render("register",array());        
        }
        
        public function actionSignup(){
            $this->layout = "column_register";
            $url = new Url();            
            $this->render("signup",array());        
        }
        
        public function actionForgot(){
            $this->layout = "column_register";
            $url = new Url();            
            $this->render("forgot",array());        
        }
        
        public function actionLoginForm(){
            $this->layout = "column_register";
            $url = new Url();            
            $this->render("login_form",array());        
        }
        
        public function actionThank(){
            $this->layout = "column_register";
            $url = new Url();            
            $this->render("thank",array());        
        }

        public function actionTest(){
            $key = "Service.veso.ketquamienbac.test12345678";  
            Yii::app()->cache->getMemCache()->set($key,4);
            $cache = Yii::app()->cache->getMemCache()->get($key);
            var_dump($cache);
        }

    }

?>